home *** CD-ROM | disk | FTP | other *** search
-
-
-
- Select 1.4
-
- by V.Gervasi - ICARUS
-
-
-
- Introduction
- --------------
-
- Did you ever wanted to perform some operation on your files, let's say
- compress, rename or delete them, and that all files matched a certain
- pattern... but one or two ? Or wanted to archive all files matching #?.c,
- but that bstro_tab.bin, too, and no other #?.bin ? Did you ever need to
- remove some file from two or more directories ?
-
- Or let's say that, while you are writing a certain shell script, you
- want to allow the user to select a file from a certain list (e.g.,
- devs:#?.device): what do you do ?
-
- In any of this cases, Select/Except is the right tool for the job. You
- only need AmigaOS 2.0 or later.
-
-
-
- Distribution
- --------------
-
- Select is not shareware, strictly speaking, and is NOT public domain.
- Select is (C) Copyright 1991 V.Gervasi - ICARUS.
-
- However, you can freely distribute it, with the only restriction that
- you cannot obtain any profit greater than the bare duplication and media
- cost (i.e., no more than $4.-).
-
- In any case, the Select executable, the icon Select.info, the Install
- script and this document, Select.doc, must be distributed together, not
- necessarily in their original .lzh archive, but in their original,
- unmodified form.
-
- You don't need to pay to use Select; however, a contribution is welcome.
- If you get 10 bucks, put them in an envelope and send it to the Author,
- you will merit his grateful wishes and, probably, an updated version.
-
- I beleive that this distribution policy is quite reasonable; let me know
- your opinion !
-
-
- Installation
- --------------
-
- Just issue "execute Install" or, if you use AmigaShell, simply "Install".
-
- The script will prompt you for a directory in which to install Select;
- the remaining actions are automatic.
-
-
- Select or Except ?
- --------------------
-
- Actually, this program is two programs. Or, better, this two programs
- are the same program. Oh, well, the program, once run, will behave
- differently depending on the name it had when run:
-
- - Select Will select from the files matching the given pattern;
- - Except Will select from the files NOT matching the given pattern.
-
- The included script, Install, takes care of performing a MAKELINK, so
- that you can have both programs without wasting twice the space on your
- disk.
-
- In the following, we will refer to Select, but Except behaves exactly in
- the same way.
-
-
- Syntax
- --------
-
- The syntax is quite simple:
-
- SELECT <command line with pattern>
-
- Here, <command line> is exactly the same you should issue to execute the
- required command, with the only exception that you can use a pattern
- whereas you would have used a file name.
-
-
- Examples:
-
- select copy df0:#? df1:
-
- Copies the files you will select from df0: to df1:
-
- select type #?.doc
-
- Types the files you will select, chosen among those whose name
- ends in ".doc".
-
- select delete #?read#?me#?
-
- Deletes all files you will select, chosen among those whose name
- contains "read" and "me", in that order.
-
- The first AmigaDOS pattern in the <command line> is used to select the
- files that will appear in list. You can select any number of files from
- this list, or add other files.
-
-
- Select's Interface
- --------------------
-
- Select's window contains a file list (corresponding to the pattern) on
- which you can operate, a single line containing a copy of the <command
- line> and 6 command buttons.
-
- You can select a file from the list simply by clicking on his name;
- beside the name will appear a ">>" symbol. As usual, you can use the
- scrolling bar to see the entire list.
-
- The "All" button selects all the files from the list, while "None"
- deselect them all. "Invert" deselects all currently selected files, and
- selects those not selected. The "Separate" button is a cycle button: by
- clicking on it once, the label becomes "Together", by clicking again, it
- returs "Separate".
-
- In the "Together" position, only one command will be executed, with all
- selected names pasted in place of the pattern; in the "Separate" position,
- one instance of the command for each selected name will be fired. Keep in
- mind that (almost) every Shell has a limit on the maximum length allowable
- for a command line; with the "Together" mode it is quite easy to
- exaggerate !
-
- The "EXECUTE" button will finally starts the command on the bottom line.
-
- Last but not least, the "?" button will allow you to add files not
- included in the list. When you press it, the system file requester will
- appear, with the option to select one or more files from any directory.
-
- The bottom line, containing the command, may be edited. In such case,
- the file list is rebuilt: you will loose any current selection.
-
-
- Other details
- ---------------
-
- In the "Separate" mode, Select can build more complex commands. Every
- time the command line contains a particular code (%x), Select will
- substitute a part of the file name:
-
-
- The code Produces
- -------- --------
- %P or %p the file's path
- %N or %n the file's name
- %B or %b the file's "base name",
- i.e., without extension
- %E or %e the file's extension
- %... ... [the same character]
-
- Examples:
-
- select rename #?.asm to %b.s [tol.asm->tol.s, h.asm->h.s]
-
- select rename foo.#? to bar%e [foo.c->bar.c, foo.h->bar.h]
-
- select copy SRC:#?.(c|h) RAM:old_%n [SRC:sel.c->RAM:old_sel.c]
-
- select rename #?.#? %e,%b [bubble.bas->.bas,bubble]
-
- select rename #? %%e%b [plot.bas->%eplot]
-
-
- In the "Together" mode, the symbol "%" has no particular significance.
-
-
-
- Final considerations
- ----------------------
-
- If you work a lot with a Shell, this program may prove helpful. Had you
- liked it, or had you not, let me know ! Constructive criticism is always
- welcome.
-
- You can send any remark to
-
- Fido: Vincenzo Gervasi, 2:33/800.21
- UUCP: [uunet|pyramid|rutgers]!cbmvax!cbmehq!cbmita!icarus!vigi
- Internet: tse10@gladio.di.unipi.it (until July 92)
- vigi@wolf.sublink.org
- cbmehq!cbmita!icarus!vigi@cbmvax.commodore.com
-
- Remarks and contribution (let's say $10) may be sent to
-
-
- Vincenzo Gervasi
- via Notai, 11
- I-56126 Pisa (Italy)
-
-
-